<?php
$this->Html->addCrumb('Home', '/admin');
$this->Html->addCrumb('Lista Paginas', array('action' => 'index'));
echo $this->Paginator->pagination();
?>
<table class="table table-condensed table-hover table-bordered">
    <thead>
        <tr>
            <th><?php echo $this->Paginator->sort('titulo', __('Título')); ?></th>
            <th><?php echo $this->Paginator->sort('default', __('Default')); ?></th>
            <th><?php echo $this->Paginator->sort('status', __('Situação')); ?></th>
            <th><?php echo $this->Paginator->sort('ordem', __('Ordem')); ?></th>
            <th><?php echo $this->Paginator->sort('exibir_menu', __('Exibir no menu')); ?></th>
            <th><?php echo $this->Paginator->sort('created', __('Criação')); ?></th>
            <th><?php echo $this->Paginator->sort('updated', __('Alteração')); ?></th>
            <th><?php echo $this->Paginator->sort('usuario_id', __('Usuário')); ?></th>
            <th><?php echo $this->Paginator->sort('router', __('Rota')); ?></th>
            <th class="actions"><?php echo __('Actions'); ?></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($paginas as $pagina) { ?>
        <tr>
                <td><?php echo h($pagina['Pagina']['titulo']); ?>&nbsp;</td>
                <td><?php echo h($pagina['Pagina']['default']); ?>&nbsp;</td>
                <td><?php echo h($pagina['Pagina']['status']); ?>&nbsp;</td>
                <td><?php echo h($pagina['Pagina']['ordem']); ?>&nbsp;</td>
                <td><?php echo h($pagina['Pagina']['exibir_menu']); ?>&nbsp;</td>
                <td><?php echo $this->Formatacao->dataHora($pagina['Pagina']['created']); ?>&nbsp;</td>
                <td><?php echo $this->Formatacao->dataHora($pagina['Pagina']['updated']); ?>&nbsp;</td>
                <td><?php echo h($pagina['Usuario']['username']); ?>&nbsp;</td>
                <td><?php echo h($pagina['Pagina']['router']); ?>&nbsp;</td>
                <td class="actions">
                    <?php echo $this->Html->link(__('View'), array('action' => 'view', $pagina['Pagina']['id']), array('class' => 'btn btn-xs btn-info', 'icon' => 'fa fa-search')); ?>
                    <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $pagina['Pagina']['id']), array('class' => 'btn btn-xs btn-warning', 'icon' => 'fa fa-pencil')); ?>
                    <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $pagina['Pagina']['id']), array('class' => 'btn btn-xs btn-danger', 'icon' => 'fa fa-trash-o'), __('Are you sure you want to delete # %s?', $pagina['Pagina']['id'])); ?>
                </td>
            </tr>
        <?php } ?>
    </tbody>
</table>
<?php echo $this->Paginator->pagination(); ?>